/****** Object:  StoredProcedure [dbo].[spChiTietBienBanKiemKeKhoGetByMaKy_ChuaDongKy]    Script Date: 10/23/2012 14:27:08 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[spChiTietBienBanKiemKeKhoGetByMaKy_ChuaDongKy]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[spChiTietBienBanKiemKeKhoGetByMaKy_ChuaDongKy]
GO

/****** Object:  StoredProcedure [dbo].[spChiTietBienBanKiemKeKhoGetByMaKy_ChuaDongKy]    Script Date: 10/23/2012 14:27:08 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[spChiTietBienBanKiemKeKhoGetByMaKy_ChuaDongKy]
	@maky as nvarchar(8)
WITH ENCRYPTION
AS
	SELECT sp.MaThuoc, sp.TenHoatChat, sp.TenBietDuoc, lk.SoLo, lk.HanSuDung, lk.TonKho as TonSoSach, lk.TonKho as TonThucTe, lk.MaLuuKho
	FROM tbl_SanPham sp
	INNER JOIN tbl_LuuKho lk ON sp.MaThuoc = lk.MaThuoc
GO


